#define _CRT_SECURE_NO_WARNINGS 1
#include "threadPool.hpp"

int main()
{
	threadPool<Task>* TP = new threadPool<Task>(4);
	TP->run();

	while (true)
	{
		int x = 10;
		usleep(123123);
		int y = 20;
		Task t(x, y, [](int x, int y){return x - y; });
		TP->pushTask(t);
		TP->pushTask(t);
		TP->pushTask(t);
		TP->pushTask(t);

		sleep(1);
	}

	return 0;
}